home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 939 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.0 KB

  1. Path: fido.asd.sgi.com!austern
  2. From: "Nathan Myers, http://www.cantrip.org/" <ncm@cantrip.org>
  3. Newsgroups: comp.std.c++
  4. Subject: Re: delete vs incomplete class type
  5. Date: 02 Apr 1996 11:11:42 PST
  6. Organization: The Cantrip Cooperative
  7. Approved: austern@isolde.mti.sgi.com
  8. Message-ID: <3160CA2D.646FFC15@cantrip.org>
  9. References: <sjcDownA7.6FA@netcom.com> <4jcdp0$b3p@venus.mcs.com> <sjcDp7BEy.3J4@netcom.com>
  10. NNTP-Posting-Host: isolde.mti.sgi.com
  11. X-Original-Date: Mon, 01 Apr 1996 22:33:17 -0800
  12. X-Mailer: Mozilla 2.01 (X11; I; Linux 1.2.13 i386)
  13. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  14.     iQBVAwUBMWF78Ey4NqrwXLNJAQGJaAH9GgP0mdKMUwZBy/unlEgcnXZtgcaooovk
  15.     aZbVY3ORnKmucv+51nUFfjzO0lZaM0nZBYSAMzqkg7DWV7nYwXoleA==
  16.     =QzTS
  17. Originator: austern@isolde.mti.sgi.com
  18.  
  19. Steven Correll (sjc@netcom.com) wrote:
  20. >         struct x;
  21. >         struct y;
  22. >
  23. >         void
  24. >         p(x *arg0, y *arg1)
  25. >         {
  26. >           delete [] arg0;
  27. >           delete arg1;
  28. >         }
  29. >
  30. > I don't see how a compiler could avoid noticing that it hasn't a clue what
  31. > destructor to invoke at compilation time. Is there a reason ... not to 
  32. > require the compiler to diagnose this as an error, instead of allowing 
  33. > it to fault at execution time?
  34.  
  35. I have to agree with Steven ... it's silly to talk about preserving
  36. legacy C code that has "delete" statements in it.  Given the great
  37. difficulty in finding bugs introduced this way, and the great ease of
  38. introducing them accidentally through inclusion errors, we certainly
  39. should change something.
  40.  
  41. Fortunately fixing this would be a restriction, not an extension,
  42. and thus is still conceivable in this round of standardization.
  43.  
  44. Nathan Myers
  45. ncm@cantrip.org  http://www.cantrip.org/
  46. ---
  47. [ comp.std.c++ is moderated.  To submit articles: Try just posting with your 
  48.                 newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  49.   comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  50.   Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  51.   Comments? mailto:std-c++-request@ncar.ucar.edu 
  52. ]
  53.